<!DOCTYPE html>

<html lang="zh-Hans">
  <head>
    <meta charset="utf-8" />
    <meta name="author" content="rogepi" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="/vue.global.js"></script>
    <title>2-bind-attribute</title>
  </head>

  <body>
    <!-- 除了文本插值，我们还可以像这样绑定元素的 attribute：-->
    <div id="bind-attribute">
      <span v-bind:title="message">
        鼠标悬停几秒钟查看此处动态绑定的提示信息！</span
      >
    </div>

    <script>
      const AttributeBinding = {
        data() {
          return {
            message: 'You loaded this page on ' + new Date().toLocaleString(),
          };
        },
      };
      Vue.createApp(AttributeBinding).mount('#bind-attribute');
    </script>
  </body>
</html>
